home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 793 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  1.6 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6e 65 | 77 73 2e 63 6f 6d 70 75 |Path: ne|ws.compu|
|00000010| 73 65 72 76 65 2e 63 6f | 6d 21 6e 65 77 73 6d 61 |serve.co|m!newsma|
|00000020| 73 74 65 72 0a 46 72 6f | 6d 3a 20 22 45 64 77 69 |ster.Fro|m: "Edwi|
|00000030| 6e 20 50 2e 20 4a 61 63 | 71 75 65 73 22 20 3c 70 |n P. Jac|ques" <p|
|00000040| 69 65 72 72 65 40 77 77 | 77 2e 6c 75 6d 69 6e 61 |ierre@ww|w.lumina|
|00000050| 69 72 65 2e 63 6f 6d 3e | 0a 4e 65 77 73 67 72 6f |ire.com>|.Newsgro|
|00000060| 75 70 73 3a 20 63 6f 6d | 70 2e 6c 61 6e 67 2e 63 |ups: com|p.lang.c|
|00000070| 2b 2b 0a 53 75 62 6a 65 | 63 74 3a 20 52 65 3a 20 |++.Subje|ct: Re: |
|00000080| 4e 65 65 64 20 68 65 6c | 70 20 6f 6e 20 22 73 74 |Need hel|p on "st|
|00000090| 72 69 6e 67 22 20 63 6f | 6e 64 69 74 69 6f 6e 61 |ring" co|nditiona|
|000000a0| 6c 20 73 74 61 74 65 6d | 65 6e 74 73 0a 44 61 74 |l statem|ents.Dat|
|000000b0| 65 3a 20 53 75 6e 2c 20 | 30 37 20 4a 61 6e 20 31 |e: Sun, |07 Jan 1|
|000000c0| 39 39 36 20 30 30 3a 35 | 37 3a 32 35 20 2d 30 35 |996 00:5|7:25 -05|
|000000d0| 30 30 0a 4f 72 67 61 6e | 69 7a 61 74 69 6f 6e 3a |00.Organ|ization:|
|000000e0| 20 48 6f 6e 67 20 4b 6f | 6e 67 20 4f 6e 6c 69 6e | Hong Ko|ng Onlin|
|000000f0| 65 2c 20 49 6e 63 2e 0a | 4d 65 73 73 61 67 65 2d |e, Inc..|Message-|
|00000100| 49 44 3a 20 3c 33 30 45 | 46 36 30 43 35 2e 35 38 |ID: <30E|F60C5.58|
|00000110| 43 42 40 77 77 77 2e 6c | 75 6d 69 6e 61 69 72 65 |CB@www.l|uminaire|
|00000120| 2e 63 6f 6d 3e 0a 52 65 | 66 65 72 65 6e 63 65 73 |.com>.Re|ferences|
|00000130| 3a 20 3c 34 62 65 69 64 | 30 24 68 30 65 40 6e 65 |: <4beid|0$h0e@ne|
|00000140| 77 73 2e 69 6f 73 2e 63 | 6f 6d 3e 0a 4e 4e 54 50 |ws.ios.c|om>.NNTP|
|00000150| 2d 50 6f 73 74 69 6e 67 | 2d 48 6f 73 74 3a 20 61 |-Posting|-Host: a|
|00000160| 64 36 37 2d 31 33 33 2e | 63 6f 6d 70 75 73 65 72 |d67-133.|compuser|
|00000170| 76 65 2e 63 6f 6d 0a 4d | 69 6d 65 2d 56 65 72 73 |ve.com.M|ime-Vers|
|00000180| 69 6f 6e 3a 20 31 2e 30 | 0a 43 6f 6e 74 65 6e 74 |ion: 1.0|.Content|
|00000190| 2d 54 79 70 65 3a 20 74 | 65 78 74 2f 70 6c 61 69 |-Type: t|ext/plai|
|000001a0| 6e 3b 20 63 68 61 72 73 | 65 74 3d 75 73 2d 61 73 |n; chars|et=us-as|
|000001b0| 63 69 69 0a 43 6f 6e 74 | 65 6e 74 2d 54 72 61 6e |cii.Cont|ent-Tran|
|000001c0| 73 66 65 72 2d 45 6e 63 | 6f 64 69 6e 67 3a 20 37 |sfer-Enc|oding: 7|
|000001d0| 62 69 74 0a 58 2d 4d 61 | 69 6c 65 72 3a 20 4d 6f |bit.X-Ma|iler: Mo|
|000001e0| 7a 69 6c 6c 61 20 32 2e | 30 62 34 20 28 57 69 6e |zilla 2.|0b4 (Win|
|000001f0| 39 35 3b 20 49 29 0a 54 | 6f 3a 20 4b 65 69 74 68 |95; I).T|o: Keith|
|00000200| 20 42 6f 72 75 66 66 20 | 3c 6b 62 6f 72 75 66 66 | Boruff |<kboruff|
|00000210| 40 76 69 6c 6c 61 67 65 | 2e 69 6f 73 2e 63 6f 6d |@village|.ios.com|
|00000220| 3e 0a 0a 4b 65 69 74 68 | 20 42 6f 72 75 66 66 20 |>..Keith| Boruff |
|00000230| 77 72 6f 74 65 3a 0a 3e | 20 0a 3e 20 49 20 61 6d |wrote:.>| .> I am|
|00000240| 20 74 72 79 69 6e 67 20 | 74 6f 20 65 6e 74 65 72 | trying |to enter|
|00000250| 20 61 20 73 74 72 69 6e | 67 20 69 6e 20 61 20 70 | a strin|g in a p|
|00000260| 72 6f 67 72 61 6d 20 61 | 6e 64 20 63 68 65 63 6b |rogram a|nd check|
|00000270| 20 74 68 69 73 20 73 74 | 72 69 6e 67 20 77 69 74 | this st|ring wit|
|00000280| 68 20 61 0a 3e 20 63 6f | 6e 64 69 74 69 6f 6e 61 |h a.> co|nditiona|
|00000290| 6c 20 22 69 66 22 20 73 | 74 61 74 65 6d 65 6e 74 |l "if" s|tatement|
|000002a0| 3a 0a 3e 20 0a 3e 20 63 | 68 61 72 20 53 74 72 69 |:.> .> c|har Stri|
|000002b0| 6e 67 4e 61 6d 65 5b 33 | 5d 3b 0a 3e 20 0a 3e 20 |ngName[3|];.> .> |
|000002c0| 63 6f 75 74 20 3c 3c 20 | 22 45 6e 74 65 72 20 73 |cout << |"Enter s|
|000002d0| 74 72 69 6e 67 22 3b 0a | 3e 20 63 69 6e 20 3e 3e |tring";.|> cin >>|
|000002e0| 20 53 74 72 69 6e 67 4e | 61 6d 65 3b 20 20 2f 2f | StringN|ame; //|
|000002f0| 20 49 20 65 6e 74 65 72 | 20 22 4a 61 6e 22 20 77 | I enter| "Jan" w|
|00000300| 69 74 68 6f 75 74 20 71 | 75 6f 74 65 20 6d 61 72 |ithout q|uote mar|
|00000310| 6b 73 0a 3e 20 0a 3e 20 | 69 66 20 28 53 74 72 69 |ks.> .> |if (Stri|
|00000320| 6e 67 4e 61 6d 65 20 3d | 3d 20 22 4a 61 6e 22 29 |ngName =|= "Jan")|
|00000330| 0a 0a 4f 6b 61 79 2c 20 | 6e 6f 77 20 53 74 72 69 |..Okay, |now Stri|
|00000340| 6e 67 4e 61 6d 65 20 69 | 73 20 61 20 63 68 61 72 |ngName i|s a char|
|00000350| 61 63 74 65 72 20 61 72 | 72 61 79 2c 20 41 4b 41 |acter ar|ray, AKA|
|00000360| 20 61 20 70 6f 69 6e 74 | 65 72 2e 20 20 57 68 65 | a point|er. Whe|
|00000370| 6e 20 79 6f 75 20 0a 63 | 6f 6d 70 61 72 65 20 69 |n you .c|ompare i|
|00000380| 74 20 74 6f 20 22 4a 61 | 6e 22 2c 20 79 6f 75 20 |t to "Ja|n", you |
|00000390| 61 72 65 20 63 6f 6d 70 | 61 72 69 6e 67 20 74 68 |are comp|aring th|
|000003a0| 65 20 6e 75 6d 65 72 69 | 63 20 6d 65 6d 6f 72 79 |e numeri|c memory|
|000003b0| 20 61 64 64 72 65 73 73 | 20 73 74 6f 72 65 64 20 | address| stored |
|000003c0| 0a 62 79 20 74 68 65 20 | 76 61 72 69 61 62 6c 65 |.by the |variable|
|000003d0| 20 22 53 74 72 69 6e 67 | 4e 61 6d 65 22 2c 20 61 | "String|Name", a|
|000003e0| 6e 64 20 74 68 65 20 6e | 75 6d 65 72 69 63 20 6d |nd the n|umeric m|
|000003f0| 65 6d 6f 72 79 20 61 64 | 64 72 65 73 73 20 6f 66 |emory ad|dress of|
|00000400| 20 74 68 65 20 0a 63 68 | 61 72 61 63 74 65 72 20 | the .ch|aracter |
|00000410| 61 72 72 61 79 20 22 4a | 61 6e 22 2e 20 20 0a 0a |array "J|an". ..|
|00000420| 54 6f 20 63 6f 6d 70 61 | 72 65 20 74 68 65 20 63 |To compa|re the c|
|00000430| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 68 65 20 6d |ontents |of the m|
|00000440| 65 6d 6f 72 79 20 61 72 | 72 61 79 73 2c 20 65 2e |emory ar|rays, e.|
|00000450| 67 2e 2d 20 74 6f 20 63 | 6f 6d 70 61 72 65 20 0a |g.- to c|ompare .|
|00000460| 53 74 72 69 6e 67 4e 61 | 6d 65 5b 30 5d 20 74 6f |StringNa|me[0] to|
|00000470| 20 27 4a 27 2c 20 53 74 | 72 69 6e 67 4e 61 6d 65 | 'J', St|ringName|
|00000480| 5b 31 5d 20 74 6f 20 27 | 61 27 2c 20 61 6e 64 20 |[1] to '|a', and |
|00000490| 53 74 72 69 6e 67 4e 61 | 6d 65 5b 32 5d 20 74 6f |StringNa|me[2] to|
|000004a0| 20 27 6e 27 3b 20 75 73 | 65 20 0a 73 74 61 6e 64 | 'n'; us|e .stand|
|000004b0| 61 72 64 20 43 20 6c 69 | 62 72 61 72 79 20 72 6f |ard C li|brary ro|
|000004c0| 75 74 69 6e 65 20 6c 69 | 6b 65 20 73 74 72 63 6d |utine li|ke strcm|
|000004d0| 70 2e 0a 0a 48 6f 77 65 | 76 65 72 20 69 66 20 79 |p...Howe|ver if y|
|000004e0| 6f 75 20 52 45 41 4c 4c | 59 20 77 61 6e 74 20 74 |ou REALL|Y want t|
|000004f0| 6f 20 74 61 6b 65 20 61 | 64 76 61 6e 74 61 67 65 |o take a|dvantage|
|00000500| 20 6f 66 20 43 2b 2b 2c | 20 72 65 61 64 20 75 70 | of C++,| read up|
|00000510| 20 61 62 6f 75 74 20 74 | 68 65 20 0a 22 73 74 72 | about t|he ."str|
|00000520| 69 6e 67 22 20 63 6c 61 | 73 73 2e 20 20 49 74 20 |ing" cla|ss. It |
|00000530| 6f 76 65 72 6c 6f 61 64 | 73 20 74 68 65 20 22 3d |overload|s the "=|
|00000540| 3d 22 20 6f 70 65 72 61 | 74 6f 72 20 73 6f 20 74 |=" opera|tor so t|
|00000550| 68 61 74 20 79 6f 75 20 | 64 6f 6e 27 74 20 68 61 |hat you |don't ha|
|00000560| 76 65 20 74 6f 20 0a 77 | 6f 72 72 79 20 61 62 6f |ve to .w|orry abo|
|00000570| 75 74 20 61 6c 6c 20 74 | 68 69 73 20 61 64 64 72 |ut all t|his addr|
|00000580| 65 73 73 20 73 74 75 66 | 66 2e 20 20 49 74 20 64 |ess stuf|f. It d|
|00000590| 6f 65 73 20 74 6f 6e 73 | 20 6f 66 20 6f 74 68 65 |oes tons| of othe|
|000005a0| 72 20 6e 65 61 74 20 73 | 74 75 66 66 20 0a 74 6f |r neat s|tuff .to|
|000005b0| 6f 21 0a 0a 3e 20 20 20 | 20 63 6f 75 74 20 3c 3c |o!..> | cout <<|
|000005c0| 20 22 4a 61 6e 75 61 72 | 79 22 3b 0a 3e 20 65 6c | "Januar|y";.> el|
|000005d0| 73 65 20 69 66 20 28 53 | 74 72 69 6e 67 4e 61 6d |se if (S|tringNam|
|000005e0| 65 20 3d 3d 20 22 46 65 | 62 22 29 0a 0a 4e 6f 74 |e == "Fe|b")..Not|
|000005f0| 65 2c 20 74 68 61 74 20 | 79 6f 75 20 68 61 64 20 |e, that |you had |
|00000600| 74 68 65 20 73 61 6d 65 | 20 70 72 6f 62 6c 65 6d |the same| problem|
|00000610| 20 6f 6e 20 74 68 69 73 | 20 6c 69 6e 65 2e 0a 0a | on this| line...|
|00000620| 3e 20 20 20 20 63 6f 75 | 74 20 3c 3c 20 22 46 65 |> cou|t << "Fe|
|00000630| 62 72 75 61 72 79 22 3b | 0a 0a 3a 29 0a 0a 2d 2d |bruary";|..:)..--|
|00000640| 20 0a 45 64 77 69 6e 20 | 50 2e 20 4a 61 63 71 75 | .Edwin |P. Jacqu|
|00000650| 65 73 0a 53 6f 66 74 77 | 61 72 65 20 45 6e 67 69 |es.Softw|are Engi|
|00000660| 6e 65 65 72 0a 70 69 65 | 72 72 65 40 77 77 77 2e |neer.pie|rre@www.|
|00000670| 6c 75 6d 69 6e 61 69 72 | 65 2e 63 6f 6d 0a |luminair|e.com. |
+--------+-------------------------+-------------------------+--------+--------+